﻿using System.Runtime.Serialization;

namespace HHPS.CreditEducation.DataProvider
{
    public partial class Capacity
    {
        public bool IsChecked { get; set; }

        public string CourseName
        {
            get { return Course.Name; }
        }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class Course
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class Faculty
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class KindOfSubject
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class Major
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class StudyCourse
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class StudyCourseDetail
    {
        public bool IsChecked { get; set; }

        public string SubjectName { get { return Subject.Name; } }
        public int NumberOfCredit { get { return Subject.NumberOfCredit; } }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class StudyPlan
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class Subject
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class SubjectRequire
    {
        public bool IsChecked { get; set; }

        public string SubjectName
        {
            get { return Subject != null ? Subject.Name : string.Empty; }
        }

        public string SubjectRequireName
        {
            get { return SubjectReq != null ? SubjectReq.Name : string.Empty; }
        }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class Syllabus
    {
        public bool IsChecked { get; set; }
        public string MajorName { get { return Major.Name; } }
        public string CourceName { get { return Course.Name; } }
        public string SubjectName { get { return Subject.Name; } }
        public int NumberOfCredit { get { return Subject.NumberOfCredit; } }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }

    public partial class User
    {
        public bool IsChecked { get; set; }

        private dynamic _properties;
        [IgnoreDataMember]
        public dynamic Properties
        {
            get
            {
                _properties = _properties ?? this.GetProperties();
                return _properties;
            }
        }
    }
}